package com.shiguiwu.springmybatis.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shiguiwu.springmybatis.app.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @description: 用户mapper
 * @author: stone
 * @date: Created by 2021/5/30 11:12
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.app.mapper
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    int deleteById(@Param("id")Integer id);

    int addBatch(@Param("userCollection") Collection<User> userCollection);

    int updateById(@Param("updated")User updated,@Param("id")Integer id);


    List<Map<String,Object>> inList(@Param("list") List<Integer> list);

    @Select("select 1")
    int test();
}
